<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./axios.min.js"></script>
</head>

<body>
  <button id="btn">发送</button>
  <video style="width: 200px;" id="video" src="" controls="controls"></video>
  <script>
    // 全局配置基础域名
    axios.defaults.baseURL='http://playlet.zonelian.com:5501'
    // 设置请求头
    axios.defaults.headers['abc']='123'
    btn.onclick = function () {
      axios({
        url: '/api/playlet/auth',
        // 请求方法
        method: 'POST',
        // 请求参数：请求体
        data: {
          zlsj: 'zlsj',
          eid: 12141
        }
      }).then(res => {
        console.log(res);
        if (res.data.code === 200) {
          video.src = res.data.data.url
        }
      })
    }
  </script>
</body>

</html>